<!DOCTYPE html>
<html lang="en">
<base href="__ROOT__">
<head>
    <meta charset="UTF-8">
    <title>TA的发布</title>
    <link rel="stylesheet" href="/public/webapp/css/base.css">
    <link rel="stylesheet" type="text/css" href="/public/webapp/css/iconfont.css"/>
    <link rel="stylesheet" href="/public/webapp/css/myRelease.css">
    <script src="/public/webapp/js/vwp.js"></script>
</head>
<style>
    .slideMenu .slideUl li{
        min-width: 150px;
        font-size: 18px;
    }    #zulist li{
    	margin-bottom: 0.5rem; 
    }
    .icon-liulan{
    	color: #4e8cef;
    }
    .left_jiantou{
    	display: inline-block;
    	transform:rotateZ(180deg);
    }
</style>
<body>
    <div class="slideMenuCon">
       <span onclick="slideMenuStBar('pver');"><i class="iconfont icon-jiantou-copy left_jiantou"></i></span>
        <div class="slideMenu">
            <ul class="slideUl"> 
                <li onclick="ajax_('chuzu',this);" class="active"><a href="javascript:void(0);">出租</a>
                </li>
                <li onclick="ajax_('qiuzu',this);"><a href="javascript:void(0);">求租</a>
                </li>
                <li onclick="ajax_('xinfang',this);"><a href="javascript:void(0);">新房出售</a>
                </li>
                <li onclick="ajax_('qiumai',this);"><a href="javascript:void(0);">求买</a>
                </li>
                <li onclick="ajax_('chushou',this);"><a href="javascript:void(0);">出售</a>
                </li>
                <li onclick="ajax_('tuandui',this);"><a href="javascript:void(0);">团队发布</a>
                </li>
                <li onclick="ajax_('xiangmu',this);"><a href="javascript:void(0);">项目发布</a>
                </li>
                <li onclick="ajax_('zhaojiang',this);"><a href="javascript:void(0);">招聘发布</a>
                </li>
                 <li onclick="ajax_('qita',this);"><a href="javascript:void(0);">其它发布</a>
                </li>
                
            </ul>
        </div>
        <span onclick="slideMenuStBar('next');"><i class="iconfont icon-jiantou-copy"></i></span>
    </div>
    <div class="odlist">
        <ul id="zulist">
        <div class="top"></div>
        <div class="bot"></div>
<!--
            <li>
                <div class="con clear">
                <div class="imgg"><img src="images/mmexport1505963899532.png" alt=""></div>
               <a href="##">
                   <div class="text">
                   
                    <div class="t1"><span>2017-08-01 10:00</span><span>16次</span></div>
                    <div class="t2">雁塔区&nbsp;华成国际&nbsp;三室一厅</div>
                    <div class="t2">雁塔区&nbsp;华成国际&nbsp;三室一厅</div>
                    <div class="t3">失效</div>
                   
                </div>
                 </a>
                </div>
                <div class="smenu clear">
                    <span><i></i>编辑</span>
                    <span><i></i>删除</span>
                    <span><i></i>15</span>
                    <span><i></i>顶置</span>
                </div>
            </li>
-->
        </ul>
    </div><!--http://www.caizhanzhushou.com/index.php?g=Wechat&m=Webmine&a=chuzu-->
     <script type="text/html" id="chuzulist">
     {{ if(!!data){ }}
     {{ for(var i=0;i<data.length;i++){ }}
     {{ var list=data[i]; }}
         {{ if(list.sort!=1){ }}
      <li>
                <div class="con clear">
                <div class="imgg"><img src="{{=imgzy(list.thumb)||list.headimg }}" alt=""></div>
               <a href="{{=rtUrl(add,list.id).herfUrl}}">
                   <div class="text">
                   
                    <div class="t1">
                    	<span>{{=new Date(list.time*1000).Format("MM-dd hh:mm:ss")}}</span>
                    	<span><i class="iconfont icon-liulan"></i>  {{=list.read}}次</span></div>
                    <div class="t2">{{=list.quyu||""}}&nbsp;{{=list.bulid||""}}&nbsp;{{=list.huxing||""}}</div>
                    <div class="t2">{{=list.mianji||""}}&nbsp;{{=list.zhuangxiu||""}}&nbsp;{{=list.yuezu||""}}&nbsp;{{=list.fenyong=='null'?"":list.fenyong}}</div>
                    <div class="t3" {{ if(getCountDown(list.time)=="已失效"){ }} style="color:#666; {{ } }}">{{=getCountDown(list.time)}}</div>
                </div>
                 </a>
                </div>
             <!--   <div class="smenu clear">
                    <a href="{{=rtUrl(root,list.id).editUrl}}"><span><i></i>编辑</span></a>
                    <a href="{{=rtUrl(add,list.id).delUrl}}"><span><i></i>删除</span></a>
                    <span><i></i>{{=list.number}}</span>
                    <a href="{{=rtUrl(add,list.id).dingUrl}}"><span><i></i>顶置</span></a>
                </div>-->
            </li>
            {{ } }}
         {{ } }}
         {{ } }}
    </script>
     <script type="text/html" id="chuzulist2">
     {{ if(!!data){ }}
     {{ for(var i=data.length-1;i>=0;i--){ }}
     {{ var list=data[i]; }}
         {{ if(list.sort==1){ }}
      <li>
                <div class="con clear">
                <div class="imgg"><img src="{{=imgzy(list.thumb)||list.headimg }}" alt=""></div>
               <a href="{{=rtUrl(add,list.id).herfUrl}}">
                   <div class="text">
                   
                    <div class="t1"><span>{{=new Date(list.time*1000).Format("MM-dd hh:mm:ss")}}</span>
                    	<span><i class="iconfont icon-liulan"></i>{{=list.read}}次</span></div>
                    	
                    <div class="t2">{{=list.quyu||""}}&nbsp;{{=list.bulid||""}}&nbsp;{{=list.huxing||""}}</div>
                    <div class="t2">{{=list.mianji||""}}&nbsp;{{=list.zhuangxiu||""}}&nbsp;{{=list.yuezu||""}}&nbsp;{{=list.fenyong=='null'?"":list.fenyong}}</div>
                    
                    <div class="t3" {{ if(getCountDown(list.time)=="已失效"){ }} style="color:#666; {{ } }}">{{=getCountDown(list.time)}}</div>
                </div>
                 </a>
                </div>
          <!--      <div class="smenu clear">
                    <a href="{{=rtUrl(root,list.id).editUrl}}"><span><i></i>编辑</span></a>
                    <a href="{{=rtUrl(add,list.id).delUrl}}"><span><i></i>删除</span></a>
                    <span><i></i>{{=list.number}}</span>
                    <a href="{{=rtUrl(add,list.id).dingUrl}}"><span><i></i>顶置</span></a>
                </div>-->
            </li>
            {{ } }}
         {{ } }}
         {{ } }}
    </script>
    
    
    
    <script src="/public/webapp/js/jquery-1.11.0.min.js"></script>
    <script src="/public/webapp/js/hammer.min.js"></script>
    <script src="/public/webapp/js/template.js" type="text/javascript" charset="utf-8"></script>
    <script src="/public/webapp/js/common.js"></script>
    <script src="/public/webapp/js/myRelease.js"></script>
    <script>
        $(".slideMenu")[0].slideMenuSt();
        var url=document.URL;
        var start=url.indexOf("&openid");
        var stop=url.length;
        var openid=url.substring(start,stop);
        var rtUrl=function(add,id){
            var obj={};
//            var dadd=((add=="chuzu"||add=="qiuzu")?"zulin":false);
            var dadd=false;
            obj.url="/index.php?g=Wechat&m=Webta&a="+add+openid;
            obj.delUrl="/index.php?g=Wechat&m=Webmine&a="+(dadd?dadd:add)+"del&id="+id+openid;
            obj.dingUrl="/index.php?g=Wechat&m=Webmine&a="+(dadd?dadd:add)+"ding&id="+id+openid;
            obj.herfUrl="/index.php?g=Wechat&m=webcont&a="+(dadd?dadd:add)+"&id="+id+openid;
            obj.editUrl="/index.php?g=Wechat&m=Webmine&a="+(dadd?dadd:add)+"ed&id="+id+openid;
//            alert(obj.editUrl)
            console.log(obj);
            return obj;
        }
        $(document).ready(function(){
				//		固定
//			var conheight =45;
			var widheight = $(window).height();
			var oTop = 45;
//			console.log(conheight);
			console.log(widheight);
			console.log(oTop);
			$(window).scroll(function(){
				var sTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
				if(sTop >= oTop){
					$(".slideMenuCon").css({"position":"fixed","top":"0","z-index":"100","width":"100%"});
				}else{
					$(".slideMenuCon").css({"position":"static"});
				};
			});
        });
        var ajax_=function(type,self,add){
        $(self).addClass("active").siblings().removeClass("active");
         
		$.ajax({
            type: "post",
            url: rtUrl(type).url,
//            url: "http://www.caizhanzhushou.com/index.php?g=Wechat&m=Webmine&a=xinfang",
            "contentType": "application/x-www-form-urlencoded; charset=utf-8",
    //        data:json,
            dataType: "json",
            success: function (data ,textStatus, jqXHR)
            {
                if(data.length>0){
                var html=$("#chuzulist").html(),
                html1=$("#chuzulist2").html(),
                datas={
                    data:data,
                    add:(type=="chuzu"||type=="qiuzu")?"zulin":type=="tuandui"?"xiangmu":(type=="qiumai"||type=="chushou")?"ershou":type,
                    root:type
                };
                var thtml=template(html,datas);
                var thtml1=template(html1,datas);
                  $("#zulist .bot").html(thtml);
                  $("#zulist .top").html(thtml1);
                  }else{
                    $("#zulist .top").empty();  
                   $("#zulist .bot").html("<div>暂无匹配数据</div>");     
                  }  

            
        },
        error:function (XMLHttpRequest, textStatus, errorThrown) {      
        }
     });
        };
   var imgzy=function(img){
        var src="";
       if(!!img){
        if(img.indexOf("|")!=-1){
            src=img.split("|")[0];
        }else{
            src=img;
        }
        }
        return src;
    }
    ajax_("chuzu");
    </script>
</body>

</html>